<?php
namespace data\service;

use data\model\Label as labelModel;
use think\facade\Session;
class LabelService extends BaseService{
    private $labelModel;

    // 模型初始化
    public function __construct()
    {
        $this->model = new labelModel;
    }

    /**
     * 根据分类获取标签
     */
    public static function getLabelByTypeId($typeId){
        return labelModel::where('type','=',$typeId)->column('id,name');
    }

    public static function getLabelByType($typeId){
        return labelModel::where('type','=',$typeId)->select();
    }


}